package cn.itrip.dao;


import cn.itrip.beans.pojo.ItripUser;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ItripUserMapper {
    int deleteByPrimaryKey(Long id);

    int insert(ItripUser record);

    int insertSelective(ItripUser record);

    ItripUser selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(ItripUser record);

    int updateByPrimaryKey(ItripUser record);

    //根据用户名查询用户
    ItripUser selectByUserCode(ItripUser itripUser);

    ItripUser findUserCode(ItripUser itripUser);

    ///根据用户id查询用户
    ItripUser findUserById(@Param("id") long id);

    //修改用户状态
    int updateActivated(@Param("activated") int activated, @Param("id") long id);

    //根据用户名查询用户
    ItripUser selectUserid(@Param("userCode") String userCode);

    List<ItripUser> findUsertoUser(@Param("id") long id);

    int selectCount(@Param("id") long id);

    List<ItripUser> findUsertoUser2(@Param("id") long id);

    List<ItripUser> findUsertoUserByconditions(@Param("id") long id, @Param("conditions") String conditions);

    /**
     * 判断是否可以删除
     *
     * @param id
     * @return
     */
    ItripUser booleandelect(@Param("id") long id);

}